﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataTier.Model.Entities
{
    public enum FillupUnits
    {
        Gallons,
        Litres
    }
    public partial class FillupEntry
    {
        private static int tempKey = 0;

        public FillupEntry()
        {
            this.UnitOfMeasure = FillupUnits.Gallons;
            this.Date = DateTime.UtcNow;
            this.FillupEntryId = --tempKey;
        }

        public FillupUnits UnitOfMeasure { get; set; }
        /// <summary>
        /// Total cost of fillup.
        /// </summary>
        public double TotalCost
        {
            get { return (this.PricePerUnit * this.TotalUnits) + this.TransactionFee; }
        }       
    }
    
}
